export const getTime=(time) => {
    let y = time.getFullYear();
    let m = time.getMonth() + 1;
    let d = time.getDate();
    let h  =  time.getHours();
    let min = time.getMinutes();
    let s = time.getSeconds();
    return `${y}-${m}-${d} ${h}:${min}:${s}`
}
export const isTimeout = (time,timeout)=>{
    time = new Date(time).getTime()
    console.log(time);
    let now = new Date().getTime()
    if(now - time > timeout){
        return false
    }else{
        return true
    } 
}